<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Cheetah Software: RobotInterface.cpp Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Cheetah Software
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
      <li><a href="../../globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('dd/d4a/_robot_interface_8cpp_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">RobotInterface.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="../../dd/d4a/_robot_interface_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d4/df6/_robot_interface_8h.html">RobotInterface.h</a>&quot;</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="../../d6/de9/_control_parameter_interface_8h.html">ControlParameters/ControlParameterInterface.h</a>&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="../../d6/dce/_cheetah3_8h.html">Dynamics/Cheetah3.h</a>&gt;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="../../d8/db6/_mini_cheetah_8h.html">Dynamics/MiniCheetah.h</a>&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;unistd.h&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d2/dc1/_simulator_parameters_8h.html">ControlParameters/SimulatorParameters.h</a>&quot;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno"><a class="line" href="../../d6/d05/class_robot_interface.html#af09b1f8b1e20aa72ee5e02cad4ca43c9">    8</a></span>&#160;<a class="code" href="../../d6/d05/class_robot_interface.html#af09b1f8b1e20aa72ee5e02cad4ca43c9">RobotInterface::RobotInterface</a>(<a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39">RobotType</a> <a class="code" href="../../d9/d42/class_robot_runner.html#ac36f7f6395167f998afe23f6d4f86c82">robotType</a>, <a class="code" href="../../de/d6f/class_graphics3_d.html">Graphics3D</a> *gfx,</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;                               <a class="code" href="../../d2/d31/class_periodic_task_manager.html">PeriodicTaskManager</a> *tm, <a class="code" href="../../d8/d86/class_control_parameters.html">ControlParameters</a>&amp; userParameters)</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;    : <a class="code" href="../../de/d2f/class_periodic_task.html">PeriodicTask</a>(tm, <a class="code" href="../../d4/df6/_robot_interface_8h.html#a9eb04f041ce2b07338f2a13eabd5f390">ROBOT_INTERFACE_UPDATE_PERIOD</a>, <span class="stringliteral">&quot;robot-interface&quot;</span>),</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;      <a class="code" href="../../d9/d42/class_robot_runner.html#ac30dc70ec5c716af67b9e5ad1116170f">_lcm</a>(<a class="code" href="../../de/df0/utilities_8h.html#aa3945f023f4c554ec5670ac03ff82525">getLcmUrl</a>(255)),</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;      _userParameters(userParameters) {</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#a5841b4fc840c609b82c09695b019324f">_parameter_request_lcmt</a>.requestNumber = 0;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#ab19d7cfebd317120842bf6ee02148c9a">_gfx</a> = gfx;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#a6afbb91c13e10d398d3c63ccb737c154">_robotType</a> = <a class="code" href="../../d9/d42/class_robot_runner.html#ac36f7f6395167f998afe23f6d4f86c82">robotType</a>;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;  printf(<span class="stringliteral">&quot;[RobotInterface] Load parameters...\n&quot;</span>);</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../d6/d05/class_robot_interface.html#a6afbb91c13e10d398d3c63ccb737c154">_robotType</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498">RobotType::MINI_CHEETAH</a>) {</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#afc54fb590930fc5a67391b99212290b2">_controlParameters</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#a18eb23794d712e6c56120e644883e4e0">initializeFromYamlFile</a>(<a class="code" href="../../de/df0/utilities_8h.html#afe1bbec53e0ac370224c4aa5c3433b0e">getConfigDirectoryPath</a>() +</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;                                              <a class="code" href="../../d2/dc1/_simulator_parameters_8h.html#a7e57f99279ad4c4bef21220b9f09e768">MINI_CHEETAH_DEFAULT_PARAMETERS</a>);</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="../../d6/d05/class_robot_interface.html#a6afbb91c13e10d398d3c63ccb737c154">_robotType</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45">RobotType::CHEETAH_3</a>) {</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#afc54fb590930fc5a67391b99212290b2">_controlParameters</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#a18eb23794d712e6c56120e644883e4e0">initializeFromYamlFile</a>(<a class="code" href="../../de/df0/utilities_8h.html#afe1bbec53e0ac370224c4aa5c3433b0e">getConfigDirectoryPath</a>() +</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;                                              <a class="code" href="../../d2/dc1/_simulator_parameters_8h.html#a5eaf6a55cc62b298e00b5dd5f02a1203">CHEETAH_3_DEFAULT_PARAMETERS</a>);</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    assert(<span class="keyword">false</span>);</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;  }</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  <span class="keywordflow">if</span> (!<a class="code" href="../../d6/d05/class_robot_interface.html#afc54fb590930fc5a67391b99212290b2">_controlParameters</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#a12b144b3d659080b6e0bfd93569b566e">isFullyInitialized</a>()) {</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    printf(<span class="stringliteral">&quot;Not all robot control parameters were initialized. Missing:\n%s\n&quot;</span>,</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;           <a class="code" href="../../d6/d05/class_robot_interface.html#afc54fb590930fc5a67391b99212290b2">_controlParameters</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#a6fc860c65c6484562dfc922cb5806410">generateUnitializedList</a>().c_str());</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;not all parameters initialized from ini file&quot;</span>);</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  }</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;  printf(<span class="stringliteral">&quot;[RobotInterface] Init LCM\n&quot;</span>);</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  printf(<span class="stringliteral">&quot;[RobotInterface] Init graphics\n&quot;</span>);</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a738072d0d6a7a632be68f6261501826b">Vec4&lt;float&gt;</a> robotColor;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  robotColor &lt;&lt; 0.2, 0.2, 0.6, 0.6;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#aab2d9c2ec0b91055e1733203f1cc65fd">_robotID</a> = <a class="code" href="../../d6/d05/class_robot_interface.html#a6afbb91c13e10d398d3c63ccb737c154">_robotType</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498">RobotType::MINI_CHEETAH</a> ? gfx-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#a49c53912e2868ee7d93cb0a3ed6d0f4b">setupMiniCheetah</a>(robotColor, <span class="keyword">true</span>)</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;                                                   : gfx-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#a2ded7e2e203f7d660f4120e0b9e3ed61">setupCheetah3</a>(robotColor, <span class="keyword">true</span>);</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  printf(<span class="stringliteral">&quot;draw list has %lu items\n&quot;</span>, <a class="code" href="../../d6/d05/class_robot_interface.html#ab19d7cfebd317120842bf6ee02148c9a">_gfx</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#aae457f1b062620bc3a23d94d9397a49b">_kinematicXform</a>.size());</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#ab19d7cfebd317120842bf6ee02148c9a">_gfx</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#abd0bda993bf3d65a019abe27efbad85e">_visualizationData</a> = &amp;<a class="code" href="../../d6/d05/class_robot_interface.html#a0f20b7c38f67e29602c2144ace3a7efd">_visualizationData</a>;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  <a class="code" href="../../df/d89/class_checkerboard.html">Checkerboard</a> checker(10, 10, 10, 10);</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;  uint64_t floorID = <a class="code" href="../../d6/d05/class_robot_interface.html#ab19d7cfebd317120842bf6ee02148c9a">_gfx</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#a1df4a5846120d050f009a8736424f221">addCheckerboard</a>(checker);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#ab19d7cfebd317120842bf6ee02148c9a">_gfx</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#ae3f55365bc72bedb51b835533c515861">updateCheckerboard</a>(0, floorID);</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#ab19d7cfebd317120842bf6ee02148c9a">_gfx</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#a792c90bc3c128f684bd62928b24d2d38">buildDrawList</a>();</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#ac0619d8ee5cc5a8dcd5ab013ab666a4f">_lcm</a>.subscribe(<span class="stringliteral">&quot;interface_response&quot;</span>, &amp;<a class="code" href="../../d6/d05/class_robot_interface.html#a429be295631bd7ee22cd2efc9fb74648">RobotInterface::handleControlParameter</a>,</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;                 <span class="keyword">this</span>);</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#ac0619d8ee5cc5a8dcd5ab013ab666a4f">_lcm</a>.subscribe(<span class="stringliteral">&quot;main_cheetah_visualization&quot;</span>,</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;                 &amp;<a class="code" href="../../d6/d05/class_robot_interface.html#a1a13156279b80e488f9535374f66a8f8">RobotInterface::handleVisualizationData</a>, <span class="keyword">this</span>);</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  printf(<span class="stringliteral">&quot;[RobotInterface] Init dynamics\n&quot;</span>);</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#a03d7f8dac509fe6a544e006b1702a5de">_quadruped</a> = robotType == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498">RobotType::MINI_CHEETAH</a> ? buildMiniCheetah&lt;double&gt;()</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;                                                    : buildCheetah3&lt;double&gt;();</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#a3d23751ea664ba1ed21be45e55029417">_model</a> = <a class="code" href="../../d6/d05/class_robot_interface.html#a03d7f8dac509fe6a544e006b1702a5de">_quadruped</a>.<a class="code" href="../../dc/d66/class_quadruped.html#ae3725898959888f0885981c43f127a07">buildModel</a>();</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#a4a34157eaef8da58c6ecdb67b327fa1b">_simulator</a> = <span class="keyword">new</span> <a class="code" href="../../d7/d9c/class_dynamics_simulator.html">DynamicsSimulator&lt;double&gt;</a>(<a class="code" href="../../d6/d05/class_robot_interface.html#a3d23751ea664ba1ed21be45e55029417">_model</a>, <span class="keyword">false</span>);</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ae2e5a0a178a2c528d8aa939f85db7a3e">DVec&lt;double&gt;</a> zero12(12);</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  <span class="keywordflow">for</span> (<a class="code" href="../../d0/d99/c_types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> i = 0; i &lt; 12; i++) {</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    zero12[i] = 0.;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  }</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#a367d5776cf4416b081e282dafa5d76e6">_fwdKinState</a>.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a> = zero12;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#a367d5776cf4416b081e282dafa5d76e6">_fwdKinState</a>.<a class="code" href="../../de/d75/struct_f_b_model_state.html#a97f42a6014fc5d9fd3dc22f7158099f4">qd</a> = zero12;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;}</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="../../d6/d05/class_robot_interface.html#a1a13156279b80e488f9535374f66a8f8">   64</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d6/d05/class_robot_interface.html#a1a13156279b80e488f9535374f66a8f8">RobotInterface::handleVisualizationData</a>(</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keyword">const</span> lcm::ReceiveBuffer *rbuf, <span class="keyword">const</span> std::string &amp;chan,</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keyword">const</span> cheetah_visualization_lcmt *msg) {</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  (void)rbuf;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  (void)chan;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 3; i++) {</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#a367d5776cf4416b081e282dafa5d76e6">_fwdKinState</a>.<a class="code" href="../../de/d75/struct_f_b_model_state.html#abbf400085816b6baa4e4a0597ac5b118">bodyPosition</a>[i] = msg-&gt;x[i];</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  }</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 4; i++) {</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#a367d5776cf4416b081e282dafa5d76e6">_fwdKinState</a>.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae42e1f0d68b89af761bcaf273b97bca7">bodyOrientation</a>[i] = msg-&gt;quat[i];</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  }</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 12; i++) {</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#a367d5776cf4416b081e282dafa5d76e6">_fwdKinState</a>.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[i] = msg-&gt;q[i];</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;  }</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#a4a34157eaef8da58c6ecdb67b327fa1b">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a1b185d90d2b15840ca57f8e2adcf84fb">setState</a>(<a class="code" href="../../d6/d05/class_robot_interface.html#a367d5776cf4416b081e282dafa5d76e6">_fwdKinState</a>);</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#a4a34157eaef8da58c6ecdb67b327fa1b">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a3c057386e8d437e8c5dbcae02acf935c">forwardKinematics</a>();</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;}</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="../../d6/d05/class_robot_interface.html#a3432a54d34a7752e6e25bb0bcaa0be2a">   85</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d6/d05/class_robot_interface.html#a3432a54d34a7752e6e25bb0bcaa0be2a">RobotInterface::run</a>() {</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../d6/d05/class_robot_interface.html#ab19d7cfebd317120842bf6ee02148c9a">_gfx</a>) {</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#ab19d7cfebd317120842bf6ee02148c9a">_gfx</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#afab0fbc56961ba8e101a2b28188efd98">updateRobotFromModel</a>(*<a class="code" href="../../d6/d05/class_robot_interface.html#a4a34157eaef8da58c6ecdb67b327fa1b">_simulator</a>, <a class="code" href="../../d6/d05/class_robot_interface.html#aab2d9c2ec0b91055e1733203f1cc65fd">_robotID</a>, <span class="keyword">true</span>);</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#ab19d7cfebd317120842bf6ee02148c9a">_gfx</a>-&gt;update();</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#ab19d7cfebd317120842bf6ee02148c9a">_gfx</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ac7b1785526bd53f8ff17592fc838a630">getDriverCommand</a>().<a class="code" href="../../d4/d51/struct_gamepad_command.html#ab3ed382619cb1e90682a324083cd4fa1">get</a>(&amp;<a class="code" href="../../d6/d05/class_robot_interface.html#a0d0fd14cf6a7585df326ec2f39591e99">_gamepad_lcmt</a>);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#ac0619d8ee5cc5a8dcd5ab013ab666a4f">_lcm</a>.publish(<a class="code" href="../../d4/df6/_robot_interface_8h.html#a4887ebe3c5bc32bb6aea5503badec739">INTERFACE_LCM_NAME</a>, &amp;<a class="code" href="../../d6/d05/class_robot_interface.html#a0d0fd14cf6a7585df326ec2f39591e99">_gamepad_lcmt</a>);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  }</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;}</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="keyword">using namespace </span><a class="code" href="../../dc/dd8/namespacestd_1_1chrono__literals.html">std::chrono_literals</a>;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="../../d6/d05/class_robot_interface.html#a3e8ce08dd7aa4f2127563e1eb8317140">   96</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d6/d05/class_robot_interface.html#a3e8ce08dd7aa4f2127563e1eb8317140">RobotInterface::sendControlParameter</a>(<span class="keyword">const</span> std::string &amp;name,</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;                                          <a class="code" href="../../df/df2/union_control_parameter_value.html">ControlParameterValue</a> value,</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;                                          <a class="code" href="../../d2/d01/_control_parameters_8h.html#a09b572cf97f12b378290dee549d8ecc3">ControlParameterValueKind</a> kind, <span class="keywordtype">bool</span> isUser) {</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../d6/d05/class_robot_interface.html#acdb1b64161be2d3023eb190db359024b">_pendingControlParameterSend</a>) {</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    printf(</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        <span class="stringliteral">&quot;[ERROR] trying to send control parameter while a send is in progress, &quot;</span></div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="stringliteral">&quot;ignoring!\n&quot;</span>);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keywordflow">return</span>;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  }</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#acdb1b64161be2d3023eb190db359024b">_pendingControlParameterSend</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> iteration = 0; iteration &lt; <a class="code" href="../../d4/df6/_robot_interface_8h.html#ab0e1910a09b5190bff3f68e23fd0717c">TIMES_TO_RESEND_CONTROL_PARAM</a>;) {</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="comment">// new message</span></div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#a5841b4fc840c609b82c09695b019324f">_parameter_request_lcmt</a>.requestNumber++;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <span class="comment">// message data</span></div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#a5841b4fc840c609b82c09695b019324f">_parameter_request_lcmt</a>.requestKind = isUser ?</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        (<a class="code" href="../../d0/d99/c_types_8h.html#a9e382f207c65ca13ab4ae98363aeda80">s8</a>)<a class="code" href="../../d6/de9/_control_parameter_interface_8h.html#ae6908d6ad8ae0bc7a200141e0c292508a7cd01036768fe3a9f7f5cccc148f833e">ControlParameterRequestKind::SET_USER_PARAM_BY_NAME</a> : (<a class="code" href="../../d0/d99/c_types_8h.html#a9e382f207c65ca13ab4ae98363aeda80">s8</a>)<a class="code" href="../../d6/de9/_control_parameter_interface_8h.html#ae6908d6ad8ae0bc7a200141e0c292508a592d3b9333f88bfabfaa2b00fb225ebb">ControlParameterRequestKind::SET_ROBOT_PARAM_BY_NAME</a>;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    strcpy((<span class="keywordtype">char</span> *)<a class="code" href="../../d6/d05/class_robot_interface.html#a5841b4fc840c609b82c09695b019324f">_parameter_request_lcmt</a>.name, name.c_str());</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    memcpy(<a class="code" href="../../d6/d05/class_robot_interface.html#a5841b4fc840c609b82c09695b019324f">_parameter_request_lcmt</a>.value, &amp;value, <span class="keyword">sizeof</span>(value));</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#a5841b4fc840c609b82c09695b019324f">_parameter_request_lcmt</a>.parameterKind = (<a class="code" href="../../d0/d99/c_types_8h.html#a9e382f207c65ca13ab4ae98363aeda80">s8</a>)kind;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    printf(<span class="stringliteral">&quot;set %s to %s (%d)\n&quot;</span>, name.c_str(),</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;           <a class="code" href="../../d2/d01/_control_parameters_8h.html#a845e4adacbcbd157527c891bb3fa4b74">controlParameterValueToString</a>(value, kind).c_str(), iteration);</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="comment">// send</span></div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#ac0619d8ee5cc5a8dcd5ab013ab666a4f">_lcm</a>.publish(<span class="stringliteral">&quot;interface_request&quot;</span>, &amp;<a class="code" href="../../d6/d05/class_robot_interface.html#a5841b4fc840c609b82c09695b019324f">_parameter_request_lcmt</a>);</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="comment">// wait for response with timeout</span></div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#a2a4906638d332684c98c649466a52e69">_waitingForLcmResponse</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#a1381d61f93d9fbcbe3760f3f7471bdcc">_lcmResponseBad</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    std::unique_lock&lt;std::mutex&gt; lock(<a class="code" href="../../d6/d05/class_robot_interface.html#a675844aed8b0339ead4c148abfe63f6c">_lcmMutex</a>);</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="../../d6/d05/class_robot_interface.html#a43d8c26122ba2ff8abd5e8186fb385df">_lcmCV</a>.wait_for(lock, 100ms) == std::cv_status::no_timeout) {</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;      <a class="code" href="../../d6/d05/class_robot_interface.html#a2a4906638d332684c98c649466a52e69">_waitingForLcmResponse</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;      <span class="comment">// check it</span></div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;      <span class="keywordflow">if</span> (<a class="code" href="../../d6/d05/class_robot_interface.html#a2a4906638d332684c98c649466a52e69">_waitingForLcmResponse</a> || <a class="code" href="../../d6/d05/class_robot_interface.html#a1381d61f93d9fbcbe3760f3f7471bdcc">_lcmResponseBad</a>) {</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        printf(</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;            <span class="stringliteral">&quot;[RobotInterface] Failed to send parameter %s (iter %d) &quot;</span></div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            <span class="stringliteral">&quot;wakeup %d bad? %d\n&quot;</span>,</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;            name.c_str(), iteration, <a class="code" href="../../d6/d05/class_robot_interface.html#a2a4906638d332684c98c649466a52e69">_waitingForLcmResponse</a>, <a class="code" href="../../d6/d05/class_robot_interface.html#a1381d61f93d9fbcbe3760f3f7471bdcc">_lcmResponseBad</a>);</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        usleep(100000);  <span class="comment">// sleep a bit to let other bad sends happen</span></div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;      } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        iteration++;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;      }</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;      <a class="code" href="../../d6/d05/class_robot_interface.html#a2a4906638d332684c98c649466a52e69">_waitingForLcmResponse</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;      <span class="comment">// fail!</span></div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;      printf(</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;          <span class="stringliteral">&quot;[RobotInterface] Failed to send parameter %s (iter %d timed out), &quot;</span></div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;          <span class="stringliteral">&quot;trying again...\n&quot;</span>,</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;          name.c_str(), iteration);</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;      usleep(100000);  <span class="comment">// sleep a bit to let other bad sends happen</span></div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    }</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;  }</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#acdb1b64161be2d3023eb190db359024b">_pendingControlParameterSend</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;}</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="../../d6/d05/class_robot_interface.html#a429be295631bd7ee22cd2efc9fb74648">  152</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d6/d05/class_robot_interface.html#a429be295631bd7ee22cd2efc9fb74648">RobotInterface::handleControlParameter</a>(</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="keyword">const</span> lcm::ReceiveBuffer *rbuf, <span class="keyword">const</span> std::string &amp;chan,</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <span class="keyword">const</span> control_parameter_respones_lcmt *msg) {</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;  (void)rbuf;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  (void)chan;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;  <span class="keywordflow">if</span> (!<a class="code" href="../../d6/d05/class_robot_interface.html#a2a4906638d332684c98c649466a52e69">_waitingForLcmResponse</a>) {</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    printf(</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <span class="stringliteral">&quot;[RobotInterface] Got a control parameter response when we weren&#39;t &quot;</span></div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        <span class="stringliteral">&quot;expecting one, ignoring it!\n&quot;</span>);</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#a1381d61f93d9fbcbe3760f3f7471bdcc">_lcmResponseBad</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="keywordflow">return</span>;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;  }</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;  <span class="comment">// got a real response, let&#39;s check it</span></div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;  <span class="keywordflow">if</span> (msg-&gt;requestNumber == <a class="code" href="../../d6/d05/class_robot_interface.html#a5841b4fc840c609b82c09695b019324f">_parameter_request_lcmt</a>.requestNumber &amp;&amp;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;      msg-&gt;parameterKind == <a class="code" href="../../d6/d05/class_robot_interface.html#a5841b4fc840c609b82c09695b019324f">_parameter_request_lcmt</a>.parameterKind &amp;&amp;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;      std::string((<span class="keywordtype">char</span> *)msg-&gt;name) == (<span class="keywordtype">char</span> *)<a class="code" href="../../d6/d05/class_robot_interface.html#a5841b4fc840c609b82c09695b019324f">_parameter_request_lcmt</a>.name) {</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#a1381d61f93d9fbcbe3760f3f7471bdcc">_lcmResponseBad</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    std::unique_lock&lt;std::mutex&gt; lock(<a class="code" href="../../d6/d05/class_robot_interface.html#a675844aed8b0339ead4c148abfe63f6c">_lcmMutex</a>);</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#a2a4906638d332684c98c649466a52e69">_waitingForLcmResponse</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#a43d8c26122ba2ff8abd5e8186fb385df">_lcmCV</a>.notify_all();</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;  }</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;}</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="../../d6/d05/class_robot_interface.html#afb4bc3cd443238371c6b09be6d6e2da7">  176</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d6/d05/class_robot_interface.html#afb4bc3cd443238371c6b09be6d6e2da7">RobotInterface::startInterface</a>() {</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#a6ad653a1de21fd21b4e2a33d63c9ce49">_running</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;  this-&gt;<a class="code" href="../../de/d2f/class_periodic_task.html#a23a65ac2dff9750a0f0d6416f2f32a6f">start</a>();</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#a41c774573f1d0eb179ff11490560916f">_lcmThread</a> = std::thread(&amp;<a class="code" href="../../d6/d05/class_robot_interface.html#a37a9d4942ce142779bf6dbdc374e239e">RobotInterface::lcmHandler</a>, <span class="keyword">this</span>);</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;  printf(<span class="stringliteral">&quot;[RobotInterface] Send parameters to robot...\n&quot;</span>);</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span> &amp;kv : <a class="code" href="../../d6/d05/class_robot_interface.html#afc54fb590930fc5a67391b99212290b2">_controlParameters</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#ab42dff0f07e88bf44c831238dd4ce96f">collection</a>.<a class="code" href="../../dd/da1/class_control_parameter_collection.html#a10baad903728358f310f523c45e0326c">_map</a>) {</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#a3e8ce08dd7aa4f2127563e1eb8317140">sendControlParameter</a>(kv.first, kv.second-&gt;get(kv.second-&gt;_kind),</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;                         kv.second-&gt;_kind, <span class="keyword">false</span>);</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;  }</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span> &amp;kv : <a class="code" href="../../d6/d05/class_robot_interface.html#a3d32b8022d60e56807eed703a04434cd">_userParameters</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#ab42dff0f07e88bf44c831238dd4ce96f">collection</a>.<a class="code" href="../../dd/da1/class_control_parameter_collection.html#a10baad903728358f310f523c45e0326c">_map</a>) {</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#a3e8ce08dd7aa4f2127563e1eb8317140">sendControlParameter</a>(kv.first, kv.second-&gt;get(kv.second-&gt;_kind),</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;                         kv.second-&gt;_kind, <span class="keyword">true</span>);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;  }</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;  </div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;}</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="../../d6/d05/class_robot_interface.html#a66c4458fa8f57b3b8dfe6cf3ad707a76">  193</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d6/d05/class_robot_interface.html#a66c4458fa8f57b3b8dfe6cf3ad707a76">RobotInterface::stopInterface</a>() {</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;  printf(<span class="stringliteral">&quot;stopInterface\n&quot;</span>);</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#a6ad653a1de21fd21b4e2a33d63c9ce49">_running</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#a216fc2b04f9d10c9ef793e43ee19b160">_taskManager</a>.<a class="code" href="../../d2/d31/class_periodic_task_manager.html#ac3a6d2e72967f7e1045b546fdb5d7eaa">stopAll</a>();</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;  printf(<span class="stringliteral">&quot;stopall done\n&quot;</span>);</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;  <a class="code" href="../../d6/d05/class_robot_interface.html#a41c774573f1d0eb179ff11490560916f">_lcmThread</a>.join();</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;  printf(<span class="stringliteral">&quot;lcmthread joined\n&quot;</span>);</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;}</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="../../d6/d05/class_robot_interface.html#a37a9d4942ce142779bf6dbdc374e239e">  202</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d6/d05/class_robot_interface.html#a37a9d4942ce142779bf6dbdc374e239e">RobotInterface::lcmHandler</a>() {</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;  <span class="keywordflow">while</span> (<a class="code" href="../../d6/d05/class_robot_interface.html#a6ad653a1de21fd21b4e2a33d63c9ce49">_running</a>) {</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    <a class="code" href="../../d6/d05/class_robot_interface.html#ac0619d8ee5cc5a8dcd5ab013ab666a4f">_lcm</a>.handleTimeout(1000);</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;  }</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;}</div><div class="ttc" id="class_robot_interface_html_a6afbb91c13e10d398d3c63ccb737c154"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a6afbb91c13e10d398d3c63ccb737c154">RobotInterface::_robotType</a></div><div class="ttdeci">RobotType _robotType</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00067">RobotInterface.h:67</a></div></div>
<div class="ttc" id="struct_f_b_model_state_html_abbf400085816b6baa4e4a0597ac5b118"><div class="ttname"><a href="../../de/d75/struct_f_b_model_state.html#abbf400085816b6baa4e4a0597ac5b118">FBModelState::bodyPosition</a></div><div class="ttdeci">Vec3&lt; T &gt; bodyPosition</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d9a/_floating_base_model_8h_source.html#l00041">FloatingBaseModel.h:41</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498">RobotType::MINI_CHEETAH</a></div></div>
<div class="ttc" id="_control_parameter_interface_8h_html_ae6908d6ad8ae0bc7a200141e0c292508a592d3b9333f88bfabfaa2b00fb225ebb"><div class="ttname"><a href="../../d6/de9/_control_parameter_interface_8h.html#ae6908d6ad8ae0bc7a200141e0c292508a592d3b9333f88bfabfaa2b00fb225ebb">ControlParameterRequestKind::SET_ROBOT_PARAM_BY_NAME</a></div></div>
<div class="ttc" id="class_draw_list_html_abd0bda993bf3d65a019abe27efbad85e"><div class="ttname"><a href="../../d1/d03/class_draw_list.html#abd0bda993bf3d65a019abe27efbad85e">DrawList::_visualizationData</a></div><div class="ttdeci">VisualizationData * _visualizationData</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d65/_draw_list_8h_source.html#l00051">DrawList.h:51</a></div></div>
<div class="ttc" id="struct_gamepad_command_html_ab3ed382619cb1e90682a324083cd4fa1"><div class="ttname"><a href="../../d4/d51/struct_gamepad_command.html#ab3ed382619cb1e90682a324083cd4fa1">GamepadCommand::get</a></div><div class="ttdeci">void get(gamepad_lcmt *lcmt)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d24/_gamepad_command_8h_source.html#l00062">GamepadCommand.h:62</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html_a3c057386e8d437e8c5dbcae02acf935c"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html#a3c057386e8d437e8c5dbcae02acf935c">DynamicsSimulator::forwardKinematics</a></div><div class="ttdeci">void forwardKinematics()</div><div class="ttdoc">Do forward kinematics for feet. </div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00053">DynamicsSimulator.h:53</a></div></div>
<div class="ttc" id="class_control_parameters_html_ab42dff0f07e88bf44c831238dd4ce96f"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html#ab42dff0f07e88bf44c831238dd4ce96f">ControlParameters::collection</a></div><div class="ttdeci">ControlParameterCollection collection</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00441">ControlParameters.h:441</a></div></div>
<div class="ttc" id="class_robot_interface_html_a3d23751ea664ba1ed21be45e55029417"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a3d23751ea664ba1ed21be45e55029417">RobotInterface::_model</a></div><div class="ttdeci">FloatingBaseModel&lt; double &gt; _model</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00077">RobotInterface.h:77</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html">DynamicsSimulator&lt; double &gt;</a></div></div>
<div class="ttc" id="class_robot_interface_html_a3e8ce08dd7aa4f2127563e1eb8317140"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a3e8ce08dd7aa4f2127563e1eb8317140">RobotInterface::sendControlParameter</a></div><div class="ttdeci">void sendControlParameter(const std::string &amp;name, ControlParameterValue value, ControlParameterValueKind kind, bool isUser)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d4a/_robot_interface_8cpp_source.html#l00096">RobotInterface.cpp:96</a></div></div>
<div class="ttc" id="namespacestd_1_1chrono__literals_html"><div class="ttname"><a href="../../dc/dd8/namespacestd_1_1chrono__literals.html">chrono_literals</a></div></div>
<div class="ttc" id="_control_parameters_8h_html_a09b572cf97f12b378290dee549d8ecc3"><div class="ttname"><a href="../../d2/d01/_control_parameters_8h.html#a09b572cf97f12b378290dee549d8ecc3">ControlParameterValueKind</a></div><div class="ttdeci">ControlParameterValueKind</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00034">ControlParameters.h:34</a></div></div>
<div class="ttc" id="class_control_parameters_html"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html">ControlParameters</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00391">ControlParameters.h:391</a></div></div>
<div class="ttc" id="class_control_parameter_collection_html_a10baad903728358f310f523c45e0326c"><div class="ttname"><a href="../../dd/da1/class_control_parameter_collection.html#a10baad903728358f310f523c45e0326c">ControlParameterCollection::_map</a></div><div class="ttdeci">std::map&lt; std::string, ControlParameter * &gt; _map</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00114">ControlParameters.h:114</a></div></div>
<div class="ttc" id="class_robot_interface_html_af09b1f8b1e20aa72ee5e02cad4ca43c9"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#af09b1f8b1e20aa72ee5e02cad4ca43c9">RobotInterface::RobotInterface</a></div><div class="ttdeci">EIGEN_MAKE_ALIGNED_OPERATOR_NEW RobotInterface(RobotType robotType, Graphics3D *gfx, PeriodicTaskManager *tm, ControlParameters &amp;userParameters)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d4a/_robot_interface_8cpp_source.html#l00008">RobotInterface.cpp:8</a></div></div>
<div class="ttc" id="_simulator_parameters_8h_html_a7e57f99279ad4c4bef21220b9f09e768"><div class="ttname"><a href="../../d2/dc1/_simulator_parameters_8h.html#a7e57f99279ad4c4bef21220b9f09e768">MINI_CHEETAH_DEFAULT_PARAMETERS</a></div><div class="ttdeci">#define MINI_CHEETAH_DEFAULT_PARAMETERS</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/dc1/_simulator_parameters_8h_source.html#l00015">SimulatorParameters.h:15</a></div></div>
<div class="ttc" id="class_graphics3_d_html_a49c53912e2868ee7d93cb0a3ed6d0f4b"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html#a49c53912e2868ee7d93cb0a3ed6d0f4b">Graphics3D::setupMiniCheetah</a></div><div class="ttdeci">size_t setupMiniCheetah(Vec4&lt; float &gt; color, bool useOld)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d90/_graphics3_d_8cpp_source.html#l00122">Graphics3D.cpp:122</a></div></div>
<div class="ttc" id="class_control_parameters_html_a12b144b3d659080b6e0bfd93569b566e"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html#a12b144b3d659080b6e0bfd93569b566e">ControlParameters::isFullyInitialized</a></div><div class="ttdeci">bool isFullyInitialized()</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00403">ControlParameters.h:403</a></div></div>
<div class="ttc" id="_cheetah3_8h_html"><div class="ttname"><a href="../../d6/dce/_cheetah3_8h.html">Cheetah3.h</a></div><div class="ttdoc">Utility function to build a Cheetah 3 Quadruped object. </div></div>
<div class="ttc" id="struct_f_b_model_state_html_ae5a66b0d3fecb2cdd9ee3c68f72e9182"><div class="ttname"><a href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">FBModelState::q</a></div><div class="ttdeci">DVec&lt; T &gt; q</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d9a/_floating_base_model_8h_source.html#l00043">FloatingBaseModel.h:43</a></div></div>
<div class="ttc" id="struct_f_b_model_state_html_a97f42a6014fc5d9fd3dc22f7158099f4"><div class="ttname"><a href="../../de/d75/struct_f_b_model_state.html#a97f42a6014fc5d9fd3dc22f7158099f4">FBModelState::qd</a></div><div class="ttdeci">DVec&lt; T &gt; qd</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d9a/_floating_base_model_8h_source.html#l00044">FloatingBaseModel.h:44</a></div></div>
<div class="ttc" id="_mini_cheetah_8h_html"><div class="ttname"><a href="../../d8/db6/_mini_cheetah_8h.html">MiniCheetah.h</a></div><div class="ttdoc">Utility function to build a Mini Cheetah Quadruped object. </div></div>
<div class="ttc" id="class_graphics3_d_html"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html">Graphics3D</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/de7/_graphics3_d_8h_source.html#l00033">Graphics3D.h:33</a></div></div>
<div class="ttc" id="_control_parameter_interface_8h_html_ae6908d6ad8ae0bc7a200141e0c292508a7cd01036768fe3a9f7f5cccc148f833e"><div class="ttname"><a href="../../d6/de9/_control_parameter_interface_8h.html#ae6908d6ad8ae0bc7a200141e0c292508a7cd01036768fe3a9f7f5cccc148f833e">ControlParameterRequestKind::SET_USER_PARAM_BY_NAME</a></div></div>
<div class="ttc" id="union_control_parameter_value_html"><div class="ttname"><a href="../../df/df2/union_control_parameter_value.html">ControlParameterValue</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00055">ControlParameters.h:55</a></div></div>
<div class="ttc" id="class_periodic_task_html"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html">PeriodicTask</a></div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00019">PeriodicTask.h:19</a></div></div>
<div class="ttc" id="class_draw_list_html_afab0fbc56961ba8e101a2b28188efd98"><div class="ttname"><a href="../../d1/d03/class_draw_list.html#afab0fbc56961ba8e101a2b28188efd98">DrawList::updateRobotFromModel</a></div><div class="ttdeci">void updateRobotFromModel(DynamicsSimulator&lt; T &gt; &amp;model, size_t id, bool updateOrigin=false)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d65/_draw_list_8h_source.html#l00170">DrawList.h:170</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html_a1b185d90d2b15840ca57f8e2adcf84fb"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html#a1b185d90d2b15840ca57f8e2adcf84fb">DynamicsSimulator::setState</a></div><div class="ttdeci">void setState(const FBModelState&lt; T &gt; &amp;state)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00061">DynamicsSimulator.h:61</a></div></div>
<div class="ttc" id="class_robot_interface_html_aab2d9c2ec0b91055e1733203f1cc65fd"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#aab2d9c2ec0b91055e1733203f1cc65fd">RobotInterface::_robotID</a></div><div class="ttdeci">uint64_t _robotID</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00061">RobotInterface.h:61</a></div></div>
<div class="ttc" id="utilities_8h_html_aa3945f023f4c554ec5670ac03ff82525"><div class="ttname"><a href="../../de/df0/utilities_8h.html#aa3945f023f4c554ec5670ac03ff82525">getLcmUrl</a></div><div class="ttdeci">std::string getLcmUrl(s64 ttl)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/da5/utilities_8cpp_source.html#l00032">utilities.cpp:32</a></div></div>
<div class="ttc" id="class_graphics3_d_html_a2ded7e2e203f7d660f4120e0b9e3ed61"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html#a2ded7e2e203f7d660f4120e0b9e3ed61">Graphics3D::setupCheetah3</a></div><div class="ttdeci">size_t setupCheetah3(Vec4&lt; float &gt; color, bool useOld)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d90/_graphics3_d_8cpp_source.html#l00117">Graphics3D.cpp:117</a></div></div>
<div class="ttc" id="class_robot_interface_html_a367d5776cf4416b081e282dafa5d76e6"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a367d5776cf4416b081e282dafa5d76e6">RobotInterface::_fwdKinState</a></div><div class="ttdeci">FBModelState&lt; double &gt; _fwdKinState</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00079">RobotInterface.h:79</a></div></div>
<div class="ttc" id="utilities_8h_html_afe1bbec53e0ac370224c4aa5c3433b0e"><div class="ttname"><a href="../../de/df0/utilities_8h.html#afe1bbec53e0ac370224c4aa5c3433b0e">getConfigDirectoryPath</a></div><div class="ttdeci">std::string getConfigDirectoryPath()</div><div class="ttdef"><b>Definition:</b> <a href="../../de/da5/utilities_8cpp_source.html#l00030">utilities.cpp:30</a></div></div>
<div class="ttc" id="_robot_interface_8h_html_a4887ebe3c5bc32bb6aea5503badec739"><div class="ttname"><a href="../../d4/df6/_robot_interface_8h.html#a4887ebe3c5bc32bb6aea5503badec739">INTERFACE_LCM_NAME</a></div><div class="ttdeci">#define INTERFACE_LCM_NAME</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00023">RobotInterface.h:23</a></div></div>
<div class="ttc" id="class_robot_interface_html_afb4bc3cd443238371c6b09be6d6e2da7"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#afb4bc3cd443238371c6b09be6d6e2da7">RobotInterface::startInterface</a></div><div class="ttdeci">void startInterface()</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d4a/_robot_interface_8cpp_source.html#l00176">RobotInterface.cpp:176</a></div></div>
<div class="ttc" id="class_robot_interface_html_a429be295631bd7ee22cd2efc9fb74648"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a429be295631bd7ee22cd2efc9fb74648">RobotInterface::handleControlParameter</a></div><div class="ttdeci">void handleControlParameter(const lcm::ReceiveBuffer *rbuf, const std::string &amp;chan, const control_parameter_respones_lcmt *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d4a/_robot_interface_8cpp_source.html#l00152">RobotInterface.cpp:152</a></div></div>
<div class="ttc" id="class_robot_interface_html_a3432a54d34a7752e6e25bb0bcaa0be2a"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a3432a54d34a7752e6e25bb0bcaa0be2a">RobotInterface::run</a></div><div class="ttdeci">void run()</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d4a/_robot_interface_8cpp_source.html#l00085">RobotInterface.cpp:85</a></div></div>
<div class="ttc" id="class_periodic_task_manager_html_ac3a6d2e72967f7e1045b546fdb5d7eaa"><div class="ttname"><a href="../../d2/d31/class_periodic_task_manager.html#ac3a6d2e72967f7e1045b546fdb5d7eaa">PeriodicTaskManager::stopAll</a></div><div class="ttdeci">void stopAll()</div><div class="ttdef"><b>Definition:</b> <a href="../../de/df7/_periodic_task_8cpp_source.html#l00123">PeriodicTask.cpp:123</a></div></div>
<div class="ttc" id="c_types_8h_html_afaa62991928fb9fb18ff0db62a040aba"><div class="ttname"><a href="../../d0/d99/c_types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a></div><div class="ttdeci">uint32_t u32</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d99/c_types_8h_source.html#l00018">cTypes.h:18</a></div></div>
<div class="ttc" id="class_robot_interface_html_a216fc2b04f9d10c9ef793e43ee19b160"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a216fc2b04f9d10c9ef793e43ee19b160">RobotInterface::_taskManager</a></div><div class="ttdeci">PeriodicTaskManager _taskManager</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00056">RobotInterface.h:56</a></div></div>
<div class="ttc" id="class_draw_list_html_aae457f1b062620bc3a23d94d9397a49b"><div class="ttname"><a href="../../d1/d03/class_draw_list.html#aae457f1b062620bc3a23d94d9397a49b">DrawList::_kinematicXform</a></div><div class="ttdeci">std::vector&lt; QMatrix4x4 &gt; _kinematicXform</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d65/_draw_list_8h_source.html#l00279">DrawList.h:279</a></div></div>
<div class="ttc" id="c_types_8h_html_a9e382f207c65ca13ab4ae98363aeda80"><div class="ttname"><a href="../../d0/d99/c_types_8h.html#a9e382f207c65ca13ab4ae98363aeda80">s8</a></div><div class="ttdeci">int8_t s8</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d99/c_types_8h_source.html#l00021">cTypes.h:21</a></div></div>
<div class="ttc" id="_simulator_parameters_8h_html"><div class="ttname"><a href="../../d2/dc1/_simulator_parameters_8h.html">SimulatorParameters.h</a></div></div>
<div class="ttc" id="class_robot_interface_html_a41c774573f1d0eb179ff11490560916f"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a41c774573f1d0eb179ff11490560916f">RobotInterface::_lcmThread</a></div><div class="ttdeci">std::thread _lcmThread</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00062">RobotInterface.h:62</a></div></div>
<div class="ttc" id="_control_parameters_8h_html_a845e4adacbcbd157527c891bb3fa4b74"><div class="ttname"><a href="../../d2/d01/_control_parameters_8h.html#a845e4adacbcbd157527c891bb3fa4b74">controlParameterValueToString</a></div><div class="ttdeci">std::string controlParameterValueToString(ControlParameterValue v, ControlParameterValueKind kind)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d90/_control_parameters_8cpp_source.html#l00034">ControlParameters.cpp:34</a></div></div>
<div class="ttc" id="_simulator_parameters_8h_html_a5eaf6a55cc62b298e00b5dd5f02a1203"><div class="ttname"><a href="../../d2/dc1/_simulator_parameters_8h.html#a5eaf6a55cc62b298e00b5dd5f02a1203">CHEETAH_3_DEFAULT_PARAMETERS</a></div><div class="ttdeci">#define CHEETAH_3_DEFAULT_PARAMETERS</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/dc1/_simulator_parameters_8h_source.html#l00016">SimulatorParameters.h:16</a></div></div>
<div class="ttc" id="class_robot_interface_html_a03d7f8dac509fe6a544e006b1702a5de"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a03d7f8dac509fe6a544e006b1702a5de">RobotInterface::_quadruped</a></div><div class="ttdeci">Quadruped&lt; double &gt; _quadruped</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00076">RobotInterface.h:76</a></div></div>
<div class="ttc" id="class_robot_interface_html_a1a13156279b80e488f9535374f66a8f8"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a1a13156279b80e488f9535374f66a8f8">RobotInterface::handleVisualizationData</a></div><div class="ttdeci">void handleVisualizationData(const lcm::ReceiveBuffer *rbuf, const std::string &amp;chan, const cheetah_visualization_lcmt *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d4a/_robot_interface_8cpp_source.html#l00064">RobotInterface.cpp:64</a></div></div>
<div class="ttc" id="class_robot_interface_html_a0f20b7c38f67e29602c2144ace3a7efd"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a0f20b7c38f67e29602c2144ace3a7efd">RobotInterface::_visualizationData</a></div><div class="ttdeci">VisualizationData _visualizationData</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00063">RobotInterface.h:63</a></div></div>
<div class="ttc" id="class_checkerboard_html"><div class="ttname"><a href="../../df/d89/class_checkerboard.html">Checkerboard</a></div><div class="ttdef"><b>Definition:</b> <a href="../../dd/ddf/_checkerboard_8h_source.html#l00015">Checkerboard.h:15</a></div></div>
<div class="ttc" id="_robot_interface_8h_html_a9eb04f041ce2b07338f2a13eabd5f390"><div class="ttname"><a href="../../d4/df6/_robot_interface_8h.html#a9eb04f041ce2b07338f2a13eabd5f390">ROBOT_INTERFACE_UPDATE_PERIOD</a></div><div class="ttdeci">#define ROBOT_INTERFACE_UPDATE_PERIOD</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00022">RobotInterface.h:22</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a738072d0d6a7a632be68f6261501826b"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a738072d0d6a7a632be68f6261501826b">Vec4</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 4, 1 &gt; Vec4</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00030">cppTypes.h:30</a></div></div>
<div class="ttc" id="_robot_interface_8h_html_ab0e1910a09b5190bff3f68e23fd0717c"><div class="ttname"><a href="../../d4/df6/_robot_interface_8h.html#ab0e1910a09b5190bff3f68e23fd0717c">TIMES_TO_RESEND_CONTROL_PARAM</a></div><div class="ttdeci">#define TIMES_TO_RESEND_CONTROL_PARAM</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00024">RobotInterface.h:24</a></div></div>
<div class="ttc" id="class_robot_interface_html_a5841b4fc840c609b82c09695b019324f"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a5841b4fc840c609b82c09695b019324f">RobotInterface::_parameter_request_lcmt</a></div><div class="ttdeci">control_parameter_request_lcmt _parameter_request_lcmt</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00058">RobotInterface.h:58</a></div></div>
<div class="ttc" id="class_robot_interface_html_ab19d7cfebd317120842bf6ee02148c9a"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#ab19d7cfebd317120842bf6ee02148c9a">RobotInterface::_gfx</a></div><div class="ttdeci">Graphics3D * _gfx</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00066">RobotInterface.h:66</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45">RobotType::CHEETAH_3</a></div></div>
<div class="ttc" id="class_draw_list_html_a792c90bc3c128f684bd62928b24d2d38"><div class="ttname"><a href="../../d1/d03/class_draw_list.html#a792c90bc3c128f684bd62928b24d2d38">DrawList::buildDrawList</a></div><div class="ttdeci">void buildDrawList()</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d8b/_draw_list_8cpp_source.html#l00266">DrawList.cpp:266</a></div></div>
<div class="ttc" id="class_graphics3_d_html_ac7b1785526bd53f8ff17592fc838a630"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html#ac7b1785526bd53f8ff17592fc838a630">Graphics3D::getDriverCommand</a></div><div class="ttdeci">GamepadCommand &amp; getDriverCommand()</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/de7/_graphics3_d_8h_source.html#l00052">Graphics3D.h:52</a></div></div>
<div class="ttc" id="class_draw_list_html_ae3f55365bc72bedb51b835533c515861"><div class="ttname"><a href="../../d1/d03/class_draw_list.html#ae3f55365bc72bedb51b835533c515861">DrawList::updateCheckerboard</a></div><div class="ttdeci">void updateCheckerboard(T height, size_t id)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d65/_draw_list_8h_source.html#l00229">DrawList.h:229</a></div></div>
<div class="ttc" id="class_robot_interface_html_a6ad653a1de21fd21b4e2a33d63c9ce49"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a6ad653a1de21fd21b4e2a33d63c9ce49">RobotInterface::_running</a></div><div class="ttdeci">bool _running</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00068">RobotInterface.h:68</a></div></div>
<div class="ttc" id="class_robot_runner_html_ac30dc70ec5c716af67b9e5ad1116170f"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#ac30dc70ec5c716af67b9e5ad1116170f">RobotRunner::_lcm</a></div><div class="ttdeci">lcm::LCM _lcm</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d41/_robot_runner_8h_source.html#l00073">RobotRunner.h:73</a></div></div>
<div class="ttc" id="class_robot_interface_html_a4a34157eaef8da58c6ecdb67b327fa1b"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a4a34157eaef8da58c6ecdb67b327fa1b">RobotInterface::_simulator</a></div><div class="ttdeci">DynamicsSimulator&lt; double &gt; * _simulator</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00078">RobotInterface.h:78</a></div></div>
<div class="ttc" id="class_robot_interface_html_a66c4458fa8f57b3b8dfe6cf3ad707a76"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a66c4458fa8f57b3b8dfe6cf3ad707a76">RobotInterface::stopInterface</a></div><div class="ttdeci">void stopInterface()</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d4a/_robot_interface_8cpp_source.html#l00193">RobotInterface.cpp:193</a></div></div>
<div class="ttc" id="class_robot_interface_html_acdb1b64161be2d3023eb190db359024b"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#acdb1b64161be2d3023eb190db359024b">RobotInterface::_pendingControlParameterSend</a></div><div class="ttdeci">bool _pendingControlParameterSend</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00059">RobotInterface.h:59</a></div></div>
<div class="ttc" id="class_robot_interface_html_a675844aed8b0339ead4c148abfe63f6c"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a675844aed8b0339ead4c148abfe63f6c">RobotInterface::_lcmMutex</a></div><div class="ttdeci">std::mutex _lcmMutex</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00070">RobotInterface.h:70</a></div></div>
<div class="ttc" id="class_robot_interface_html_a2a4906638d332684c98c649466a52e69"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a2a4906638d332684c98c649466a52e69">RobotInterface::_waitingForLcmResponse</a></div><div class="ttdeci">bool _waitingForLcmResponse</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00072">RobotInterface.h:72</a></div></div>
<div class="ttc" id="cpp_types_8h_html_ae2e5a0a178a2c528d8aa939f85db7a3e"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#ae2e5a0a178a2c528d8aa939f85db7a3e">DVec</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, Eigen::Dynamic, 1 &gt; DVec</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00102">cppTypes.h:102</a></div></div>
<div class="ttc" id="_control_parameter_interface_8h_html"><div class="ttname"><a href="../../d6/de9/_control_parameter_interface_8h.html">ControlParameterInterface.h</a></div><div class="ttdoc">Types to allow remote access of control parameters, for use with LCM/Shared memory. </div></div>
<div class="ttc" id="cpp_types_8h_html_a78d284d08fd22d809fd436256f2cbc39"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39">RobotType</a></div><div class="ttdeci">RobotType</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00120">cppTypes.h:120</a></div></div>
<div class="ttc" id="class_robot_interface_html_a43d8c26122ba2ff8abd5e8186fb385df"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a43d8c26122ba2ff8abd5e8186fb385df">RobotInterface::_lcmCV</a></div><div class="ttdeci">std::condition_variable _lcmCV</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00071">RobotInterface.h:71</a></div></div>
<div class="ttc" id="class_robot_interface_html_a1381d61f93d9fbcbe3760f3f7471bdcc"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a1381d61f93d9fbcbe3760f3f7471bdcc">RobotInterface::_lcmResponseBad</a></div><div class="ttdeci">bool _lcmResponseBad</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00073">RobotInterface.h:73</a></div></div>
<div class="ttc" id="class_robot_interface_html_a0d0fd14cf6a7585df326ec2f39591e99"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a0d0fd14cf6a7585df326ec2f39591e99">RobotInterface::_gamepad_lcmt</a></div><div class="ttdeci">gamepad_lcmt _gamepad_lcmt</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00057">RobotInterface.h:57</a></div></div>
<div class="ttc" id="class_periodic_task_html_a23a65ac2dff9750a0f0d6416f2f32a6f"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a23a65ac2dff9750a0f0d6416f2f32a6f">PeriodicTask::start</a></div><div class="ttdeci">void start()</div><div class="ttdef"><b>Definition:</b> <a href="../../de/df7/_periodic_task_8cpp_source.html#l00020">PeriodicTask.cpp:20</a></div></div>
<div class="ttc" id="_robot_interface_8h_html"><div class="ttname"><a href="../../d4/df6/_robot_interface_8h.html">RobotInterface.h</a></div><div class="ttdoc">Interface between simulator and hardware using LCM. </div></div>
<div class="ttc" id="class_robot_interface_html_afc54fb590930fc5a67391b99212290b2"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#afc54fb590930fc5a67391b99212290b2">RobotInterface::_controlParameters</a></div><div class="ttdeci">RobotControlParameters _controlParameters</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00064">RobotInterface.h:64</a></div></div>
<div class="ttc" id="class_control_parameters_html_a18eb23794d712e6c56120e644883e4e0"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html#a18eb23794d712e6c56120e644883e4e0">ControlParameters::initializeFromYamlFile</a></div><div class="ttdeci">void initializeFromYamlFile(const std::string &amp;path)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d90/_control_parameters_8cpp_source.html#l00365">ControlParameters.cpp:365</a></div></div>
<div class="ttc" id="class_robot_interface_html_a37a9d4942ce142779bf6dbdc374e239e"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a37a9d4942ce142779bf6dbdc374e239e">RobotInterface::lcmHandler</a></div><div class="ttdeci">void lcmHandler()</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d4a/_robot_interface_8cpp_source.html#l00202">RobotInterface.cpp:202</a></div></div>
<div class="ttc" id="class_periodic_task_manager_html"><div class="ttname"><a href="../../d2/d31/class_periodic_task_manager.html">PeriodicTaskManager</a></div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00057">PeriodicTask.h:57</a></div></div>
<div class="ttc" id="struct_f_b_model_state_html_ae42e1f0d68b89af761bcaf273b97bca7"><div class="ttname"><a href="../../de/d75/struct_f_b_model_state.html#ae42e1f0d68b89af761bcaf273b97bca7">FBModelState::bodyOrientation</a></div><div class="ttdeci">EIGEN_MAKE_ALIGNED_OPERATOR_NEW Quat&lt; T &gt; bodyOrientation</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d9a/_floating_base_model_8h_source.html#l00040">FloatingBaseModel.h:40</a></div></div>
<div class="ttc" id="class_control_parameters_html_a6fc860c65c6484562dfc922cb5806410"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html#a6fc860c65c6484562dfc922cb5806410">ControlParameters::generateUnitializedList</a></div><div class="ttdeci">std::string generateUnitializedList()</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d90/_control_parameters_8cpp_source.html#l00089">ControlParameters.cpp:89</a></div></div>
<div class="ttc" id="class_draw_list_html_a1df4a5846120d050f009a8736424f221"><div class="ttname"><a href="../../d1/d03/class_draw_list.html#a1df4a5846120d050f009a8736424f221">DrawList::addCheckerboard</a></div><div class="ttdeci">size_t addCheckerboard(Checkerboard &amp;checkerBoard)</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d8b/_draw_list_8cpp_source.html#l00215">DrawList.cpp:215</a></div></div>
<div class="ttc" id="class_quadruped_html_ae3725898959888f0885981c43f127a07"><div class="ttname"><a href="../../dc/d66/class_quadruped.html#ae3725898959888f0885981c43f127a07">Quadruped::buildModel</a></div><div class="ttdeci">FloatingBaseModel&lt; T &gt; buildModel()</div><div class="ttdef"><b>Definition:</b> <a href="../../da/dfc/_quadruped_8cpp_source.html#l00113">Quadruped.cpp:113</a></div></div>
<div class="ttc" id="class_robot_interface_html_a3d32b8022d60e56807eed703a04434cd"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#a3d32b8022d60e56807eed703a04434cd">RobotInterface::_userParameters</a></div><div class="ttdeci">ControlParameters &amp; _userParameters</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00065">RobotInterface.h:65</a></div></div>
<div class="ttc" id="class_graphics3_d_html_ab325796e856cbad5652d35436d48b942"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">Graphics3D::_drawList</a></div><div class="ttdeci">DrawList _drawList</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/de7/_graphics3_d_8h_source.html#l00049">Graphics3D.h:49</a></div></div>
<div class="ttc" id="class_robot_interface_html_ac0619d8ee5cc5a8dcd5ab013ab666a4f"><div class="ttname"><a href="../../d6/d05/class_robot_interface.html#ac0619d8ee5cc5a8dcd5ab013ab666a4f">RobotInterface::_lcm</a></div><div class="ttdeci">lcm::LCM _lcm</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/df6/_robot_interface_8h_source.html#l00060">RobotInterface.h:60</a></div></div>
<div class="ttc" id="class_robot_runner_html_ac36f7f6395167f998afe23f6d4f86c82"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#ac36f7f6395167f998afe23f6d4f86c82">RobotRunner::robotType</a></div><div class="ttdeci">RobotType robotType</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d41/_robot_runner_8h_source.html#l00047">RobotRunner.h:47</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_43e0a1f539e00dcfa1a6bc4d4fee4fc2.html">home</a></li><li class="navelem"><a class="el" href="../../dir_61bfb0b3cdda81b1b0355ba34eb3b1eb.html">dhkim</a></li><li class="navelem"><a class="el" href="../../dir_adee5b101e079090017bb4e91c628ead.html">Public_Repository</a></li><li class="navelem"><a class="el" href="../../dir_7fc07a7b97001e7b1d18e11da761e2de.html">Cheetah-Software</a></li><li class="navelem"><a class="el" href="../../dir_e380f5e928ac62e3c78e1e401f2404bd.html">sim</a></li><li class="navelem"><a class="el" href="../../dir_a016bb1cae11d95bfbad53e4af068c30.html">src</a></li><li class="navelem"><a class="el" href="../../dd/d4a/_robot_interface_8cpp.html">RobotInterface.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
